<?php
class Video extends MY_Controller
{
    function __construct() {
        parent::__construct();
        $this->load->model('model_videos');
        $this->load->helper('main_helper');
		$this->load->library("urlutility");
		$this->load->library("string");
    }
    function index() {
		$data['vietnam'] = $this->destination(1);
		$data['cambodia'] = $this->destination(2);
		$data['hlaos'] = $this->destination(3);
		$data['blogvie'] = $this->model_home->blog(1);
		$data['blogcam'] = $this->model_home->blog(2);
		$data['bloglao'] = $this->model_home->blog(3);
		$data['holiday'] = $this->holiday();
		$data['title'] = 'Videos';
        $data['template'] = "video/index";
		$data['destination'] = $this->model_home->destination();
        $data['listdata'] = $this->model_videos->listall();
        $this->load->view('video/layout',$data);
    }
	function detail($idalbum){
		$data['vietnam'] = $this->destination(1);
		$data['cambodia'] = $this->destination(2);
		$data['hlaos'] = $this->destination(3);
		$data['blogvie'] = $this->model_home->blog(1);
		$data['blogcam'] = $this->model_home->blog(2);
		$data['bloglao'] = $this->model_home->blog(3);
		$data['holiday'] = $this->holiday();
        $data['template'] = "video/detail";
		$data['destination'] = $this->model_home->destination();
        $data['detail'] = $this->model_videos->getdata($idalbum);
		$data['title'] = $data["detail"]["title"];
        $this->load->view('video/layout2',$data);
	}
}
?>